package com.water.controller.wx;


import com.water.entity.BeOrder;
import com.water.service.BeOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("wx")
public class Wx_Ding {


    @Autowired
    BeOrderService beOrderService;


    /**
     * 查询订单
     * @param map
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "findDingStat",method = RequestMethod.POST)
    public BeOrder findDing(@RequestBody Map map){
        System.out.println(map);
        String wxuserid= (String) map.get("uid");
        System.out.println(wxuserid);
BeOrder beOrderList= beOrderService.findDing(wxuserid);
        System.out.println(beOrderList);

        return beOrderList;
    }

    /**
     * 查询订单
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "findDingStat",method = RequestMethod.GET)
    public BeOrder findDing(){

        BeOrder beOrderList= beOrderService.findDing("Ot4PCdi5Wte7MNhY");
        System.out.println(beOrderList);

        return beOrderList;
    }

    @ResponseBody
    @RequestMapping(value = "/a1",method = RequestMethod.GET)
    public String test(){
        return "test";
    }

}
